<div id="show_data" name="data">
	<div class="show_content_title">
		<img src="../img/product/static/show_data.png">
	</div>
	<div class="show_data_title">
		<ul id="show_data_title_ul">
			<?php 
				$persons = getPersonType($product[id]);
				$personIndex = 1;
				foreach ($persons as $row) {
					if($personIndex == 1) {
						echo <<<LABEL
							<li class="show_data_title_ul_li_mouse" onclick="fundata($personIndex)">$row[name]</li>
LABEL;
					} else {
						echo <<<LABEL
							<li class="show_data_title_ul_li" onclick="fundata($personIndex)">$row[name]</li>
LABEL;
					}
					$personIndex ++;
				}
			?>
		</ul>
	</div>


	<?php 
		$personIndex = 1;
		foreach ($persons as $person) {
			echo <<<LABEL
			<div class="show_data_content" id="show_data_$personIndex">
				<table>
					<tbody>
LABEL;
			$contents = getMaterial($product[id], $person[person_type]);
			$first = 1;
			foreach ($contents as $content) {
				
				$file = '';
				if($content[file_type] == 0) {
					$file = '<a href="img/product/file/'.$content[file_path].'">下载模版</a>';
				} else if ($content[file_type] == 1) {
					$file = '<a class="loock_show" href="javascript:void(0)" notice="'.$content[notice].'"
						value="img/product/file/'.$content[file_path].'">查看样例</a>';
				}
				
				if($first == 1) {
					echo <<<LABEL
					<tr>
						<td rowspan="6" valign="top">
							<img src="../img/product/material/$person[icon]" /><br />
							$person[name]<span>基本</span>资料</td>
						<td>$content[label]</td>
						<td>$content[content]</td>
						<td>$file</td>
					</tr>
LABEL;
				} else {
					echo <<<LABEL
					<tr>
						<td>$content[label]</td>
						<td>$content[content]</td>
						<td>$file</td>
					</tr>
LABEL;
				}
				$first ++;
			}
			
			echo <<<LABEL
					</tbody>
				</table>
			</div>
			<div style="clear: both"></div>
			
LABEL;
			$personIndex ++;
		}
		
	?>
	
</div>
<div id="show_block"  >
	<a id="close" href="javascript:void(0);">×</a>
	<div style="clear:both"></div>
	<img src="#" id="img_show" />
	<div id="show_block_text">
		<div id="show_block_text_title"></div>
		<div id="show_block_text_content"></div>
	</div>
</div>
<script src="js/popup_layer.js" type="text/javascript" language="javascript"></script>
<script language="javascript">
	$(document).ready(function() {
		 $(".loock_show").click(function(){
				var src = $(this).attr("value");
				var text = $(this).attr("notice");
				$("#show_block_text_content").html(text);
				$("#img_show").attr("src",src);
			});
		var showblock = new PopupLayer({trigger:".loock_show",popupBlk:"#show_block",closeBtn:"#close",useOverlay:true,useFx:true,
			offsets:{
				x:-500,
				y:0
			}
		});
		showblock.doEffects = function(way){
			if(way == "open"){
				this.popupLayer.css({opacity:0.3}).show(400,function(){
					this.popupLayer.animate({
						left:($(document).width() - this.popupLayer.width())/2,
						top:(document.documentElement.clientHeight - this.popupLayer.height())/2 + $(document).scrollTop(),
						opacity:0.8
					},500,function(){this.popupLayer.css("opacity",1)}.binding(this));
				}.binding(this));
				
			}
			else{
				this.popupLayer.animate({
					left:this.trigger.offset().left,
					top:this.trigger.offset().top,
					opacity:0.1
				},{duration:500,complete:function(){this.popupLayer.css("opacity",1);this.popupLayer.hide()}.binding(this)});
			}
		}
	});
</script>